from fastapi import APIRouter, Depends
from sqlalchemy import select
from fastapi_amis_admin.globals.deps import SyncSess
from apps.category.models import Category

router = APIRouter(prefix='/category', tags=['CategoryAPI'])


@router.get('/{id}', response_model=Category)
async def get_category(id: int, session: SyncSess):
    return await session.get(Category, id)